<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <div>
            <button @click="type=1">新闻</button>
            <button @click="type=2">体育</button>
            <button @click="type=3">音乐</button>
            <button @click="type=4">电影</button>
        </div>
        <!-- v-show也是需要接收一个boolean 决定当前元素时display：none还是block -->
        <ul v-show="type===1">
            <li>李波昨晚</li>
            <li>李波前天晚上</li>
            <li>李波明天晚上</li>
        </ul>
        <ul v-show="type===2">
            <li>李波扣篮</li>
            <li>李波连续扣篮</li>
            <li>李波连续被扣</li>
        </ul>
        <ul v-show="type===3">
            <li>李波战关公</li>
            <li>李波战李逵</li>

        </ul>
        <ul v-show="type===4">
            <li>李波大战奥特曼</li>
            <li>李波大战哥斯拉</li>
            <li>李波打老虎</li>
        </ul>
    </div>

    <script>
        Vue.config.prodactionTip = false

        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    type: 1
                }
            }
        })
    </script>
</body>

</html>